/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Gramatica;

/**
 *
 * @author David Fernandez <david@gluem.org>
 */
public class SimboloNoTerminal implements ISimbolo {

    private String simbolo;

    public SimboloNoTerminal(String simbolo) {

        this.simbolo = simbolo;
    }

    /**
     * @return the simbolo
     */
    public String getSimbolo() {
        return simbolo;
    }

    /**
     * @param simbolo the simbolo to set
     */
    public void setSimbolo(String simbolo) {
        this.simbolo = simbolo;
    }

    @Override
    public String toString() {

        return simbolo;
    }

    @Override
    public boolean equals(Object o) {

        boolean igual = false;
        try {
            SimboloNoTerminal aux = (SimboloNoTerminal) o;
            igual = simbolo.equals(aux.getSimbolo());
        } catch (ClassCastException ex) {

            igual = false;
        } finally {

            return igual;
        }

    }
}
